[Issue:5669] Fix the ledgerID not found cause NPE - #5809
Conversation
Signed-off-by: xiaolong.ran <rxl@apache.org>
|
@wolfstudy The way to fix it is right. Please help resolve sijie's comments |
Signed-off-by: xiaolong.ran <rxl@apache.org>
Signed-off-by: xiaolong.ran <rxl@apache.org>
|
run integration tests |
|
@sijie @codelipenghui PTAL |
|
run integration tests |
|
run integration tests |
|
ping @sijie PTAL |
|
run integration tests |
|
run java8 tests |
run java8 tests |
run java8 tests |
|
run java8 tests |
1 similar comment
|
run java8 tests |
run java8 tests |
|
run java8 tests |
|
run java8 tests |
run java8 tests |
## Motivation when ledgers.ceilingKey return a NULL value, we need to process the ledgerId is NUll case. ## Modifications change long ledgerId to Long ledgerId and check if ledgerId is NULL.
| PositionImpl startReadOperationOnLedger(PositionImpl position) { | ||
| long ledgerId = ledgers.ceilingKey(position.getLedgerId()); | ||
| PositionImpl startReadOperationOnLedger(PositionImpl position, OpReadEntry opReadEntry) { | ||
| Long ledgerId = ledgers.ceilingKey(position.getLedgerId()); |
There was a problem hiding this comment.
The change maybe not fix npe, it will cause new npe problem.
see this pr line_1800. if ledgerId is null, unbox will cause npe. And opReadEntry callback didn't put ctx, the callback process need use it, npe again.
Signed-off-by: xiaolong.ran rxl@apache.org
Fixes #5669
Motivation
when
ledgers.ceilingKeyreturn a NULL value, we need to process theledgerIdis NUll case.Modifications
long ledgerIdtoLong ledgerIdand check ifledgerIdis NULL.